<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>碳排放计算器</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>碳排放计算器</h1>
<form id="carbonForm">
    <label for="distance">每日行驶距离（公里）:</label>
    <input type="number" id="distance" name="distance" required><br><br>

    <label for="publicTransport">每周使用公共交通次数:</label>
    <input type="number" id="publicTransport" name="publicTransport" required><br><br>

    <label for="meatConsumption">每周肉类消费量（公斤）:</label>
    <input type="number" id="meatConsumption" name="meatConsumption" required><br><br>

    <button type="button" onclick="calculateCarbon()">计算碳排放</button>
</form>

<div id="result"></div>

<script src="script.js"></script>
</body>
</html>

  